#ifndef CIRCLECHARTPAGE_H
#define CIRCLECHARTPAGE_H

#include <QWidget>
#include <QtCharts/QPieSeries>
#include <QtCharts/QPieSlice>
#include <QtCharts/QChart>
#include <QtCharts/QChartView>

namespace Ui {
class CircleChartPage;
}

class CircleChartPage : public QWidget
{
    Q_OBJECT

public:
    explicit CircleChartPage(QWidget *parent = nullptr);
    ~CircleChartPage();

public slots:
    void addTemperatureData(int value);
    void addHumidityData(int value);
    void addLightData(int value);

private:
    Ui::CircleChartPage *ui;
    QPieSeries *temperatureSeries;
    QPieSlice *temperatureWarningSlice;
    QPieSlice *temperatureAlarmSlice;
    QChart *temperatureChart;

    QPieSeries *humiditySeries;
    QPieSlice *humidityWarningSlice;
    QPieSlice *humidityAlarmSlice;
    QChart *humidityChart;

    QPieSeries *lightSeries;
    QPieSlice *lightWarningSlice;
    QPieSlice *lightAlarmSlice;
    QChart *lightChart;

    int temperatureWarningCount;
    int temperatureAlarmCount;
    int humidityWarningCount;
    int humidityAlarmCount;
    int lightWarningCount;
    int lightAlarmCount;
};

#endif // CIRCLECHARTPAGE_H
